<?php

namespace Modules\User\Http\Controllers\API;

use Illuminate\Http\Request;
use Modules\User\Services\WechatService;
use App\Http\Controllers\Controller;

class UserWechatController extends Controller
{
  public function login(Request $request, WechatService $wechatService)
  {
    // 参数校验
    $request->validate([
      'code' => 'required|string'
    ]);

    return $wechatService->login($request->all());
  }
}
